<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>删除数组的重复元素</title>

	<script type="text/javascript">
	function del(arr){
		for(var i=0;i<(arr.length-1);i++){
			for(var j=i+1;j<arr.length;j++)
			{
				if(arr[i]==arr[j]){
					arr.splice(j, 1);
				}
			}
		}
		return arr;
	}
	var arr = ['a','b','a','c','c','d','e','e','f','f','a','b'];
	document.write(del(arr));
	</script>
</head>
<body>
	
</body>
</html>